//
//  StoreArtListCollectionCell.m
//  ArtDog
//
//  Created by dllo on 16/9/7.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "StoreArtListCollectionCell.h"
#import "HomeExhibitWorkList.h"
#import "UIImageView+WebCache.h"

@interface StoreArtListCollectionCell ()

@property (weak, nonatomic) IBOutlet UIImageView *picImageView;

@property (weak, nonatomic) IBOutlet UILabel *nameLabel;

@property (weak, nonatomic) IBOutlet UILabel *priceLabel;

@property (weak, nonatomic) IBOutlet UILabel *autorLabel;

@property (weak, nonatomic) IBOutlet UILabel *sizeLabel;

@property (weak, nonatomic) IBOutlet UILabel *materialLabel;

@property (weak, nonatomic) IBOutlet UILabel *yearLabel;

@end

@implementation StoreArtListCollectionCell

- (void)awakeFromNib {
    [super awakeFromNib];
    
}

- (void)setArtModel:(HomeExhibitWorkList *)artModel
{
    _artModel = artModel;
    [_picImageView sd_setImageWithURL:[NSURL URLWithString:artModel.worksPic] placeholderImage:[UIImage imageNamed:@"placeholder"]];
    _nameLabel.text = artModel.workName;
    _autorLabel.text = artModel.author;
    _priceLabel.text = [artModel.sellType integerValue] == 1 ? [NSString stringWithFormat:@"¥ %@", artModel.sellPrice]: @"私洽";
    _sizeLabel.text = artModel.worksSize;
    _materialLabel.text = artModel.worksMaterial;
    _yearLabel.text = artModel.worksYears;
    
    
    
}

@end
